STEP 13: Right now Wilbur's just throwing away a steel can. Let's change that!

In the first line of our loop, value represents the current item we're applying actions to.

  • In this case, value first equals "sodacan", then "steelcan", etc..
  • In the loop find the .Sprite() command. Replace the "steelcan" image label with the variable value .
  • Now, Wilbur cleans up the park using just one block of code!

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)